import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;

import org.apache.commons.io.IOUtils;

import com.swf.seed.triutil.lang.SdFileUtils;
import com.swf.seed.triutil.lang.SdIOUtils;


public class LCT {
	public static void main(String[] args) throws IOException {
		File inFile = SdFileUtils.getFile("e:/ecs-0.log");
		InputStreamReader isr = new InputStreamReader(new FileInputStream(inFile),"GBK");
		BufferedReader br = new BufferedReader(isr);
		String line = null;
		int lineNumber = 0;
		int skipLineNumber = 99670;
		SdIOUtils io = new SdIOUtils();
		io.setCharst("GBK");
		io.setOutPath("e:/a.txt");
		io.setAppend(true);
		while ((line = br.readLine())!=null){
			/*if (++lineNumber>skipLineNumber ){
		if (line.contains("<sp_user/><retcode>0</retcode>")){
			System.out.println(lineNumber);
				}*/
			if (++lineNumber>1 && lineNumber<20000){
				io.setContent(line);
				io.writeByline();
			}
		}
	}
}
